body {
    font-family: eb-garamond;
    background-color: #f8f8f8;
    margin: 0;
    padding: 20px;
}
.header {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px; 
    height: 100vh;
    
}
.left-section {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 70%;
    height: 100%;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
}
.right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 30%;
    height: 100%;
    overflow-y: auto;
}
.overview, .instructions {
    display: flex;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}
.title {
    font-size: large;
    font-weight: bold;
    font-family: eb-garamond;
}
.overview { background-color: #d8e3ff; }
.instructions { background-color: #ffd8f0; display: flex; flex-direction: column; }
.pre-activity { background-color: #ffe4b3; }

@media(max-width : 768px)
{
    .container{
        flex-direction: column;
        height: auto;
    }

    .left-section, .right-section{
        width: 100%;
    }

    .overview, .instructions{
        width: 100%;
        display: block;
    }
}
ul {
    padding-left: 20px;
}

#controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    position: relative;
    width: fit-content;
    gap: 10px;
}


button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

#element{
    border-radius: 5px;
    margin-right: 20px;
    min-height: 40px;
    min-width: 20px;
}

.content{
    font-family: eb-garamond;
    font-size: large;
}
.push { background: #2fa12f; color: white; }
.pop { background: #b32727; color: white; }
.top { background: #ffb300; color: black; }
.size { background: #87dbe9; }
.empty { background: #5d5df1; color: white; }
.reset { background-color: #ff5722;color: white; }



/* Popup styling */
#popup-message{
    display: none;
    position: relative;
    background: lightblue;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: opacity 0.5s ease-in-out;
}

#stack-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    gap: 10px;
    transition: height 0.3s ease-in-out;
    max-height: 400px;
}

#stack-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    width: 120px;
    min-height: 200px;
    max-height: 400px;
    border-left: 3px solid navy;
    border-right: 3px solid navy;
    border-bottom: 3px solid navy; /* Removed top border */
    border-radius: 0 0 10px 10px; /* Rounded only at the bottom */
    overflow-y: auto;
    padding: 10px;
    transition: height 0.3s ease-in-out;
    
}

.stack-item {
    background-color: coral;
    padding: 10px;
    margin: 2px;
    width: auto;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    position: relative;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.5s ease-out, opacity 0.5s ease-in-out;
}

.stack-item.show {
    transform: translateY(0);
    opacity: 1;
}
